package com.hdyg.sixg.adapter;

import android.support.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hdyg.sixg.R;
import com.hdyg.sixg.entry.FragMainBean;
import com.hdyg.sixg.util.ImageLoadUtil;
import java.util.List;


/**
 * @author CZB
 * @describe 首页币适配器
 * @time 2019/3/20 14:22
 */
public class FMMainBiAdapter extends BaseQuickAdapter<FragMainBean.CoinsBean, BaseViewHolder> {

    public FMMainBiAdapter(int layoutResId, @Nullable List<FragMainBean.CoinsBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FragMainBean.CoinsBean item) {
        ImageLoadUtil.imageLoad(mContext,item.getImg(),helper.getView(R.id.iv_bi));
        helper.setText(R.id.tv_bi_name,item.getEn_name());
        helper.setText(R.id.tv_bi_number,item.getBalance());
        helper.setText(R.id.tv_bi_price,item.getPrice());
        helper.setText(R.id.tv_bi_total,item.getTotal());
    }
}
